package utils;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.ArrayListHandler;

import java.sql.SQLException;
import java.util.Arrays;
import java.util.List;

public class TestInsert {


    public static void main(String[] args) throws SQLException {
        QueryRunner qr = new QueryRunner(DruidUtils.getDataSource());

        String sql = "SELECT * FROM employee WHERE NAME = ?";

        List<Object[]> query = qr.query(sql, new ArrayListHandler(),"吴亦凡");

        for (Object[] objects : query) {
            System.out.println(Arrays.toString(objects));
        }
    }

}
